<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
    <link href="<s:url value="resources/css/main.css"/>" rel="stylesheet" type="text/css"/>
    <title><s:text name="label.orderDetails"/></title>
</head>
<body>

<table align=center>
<tr><td><h1 ><s:text name="label.orderDetails"/> </h1></td></tr>
</table>
	<table width=600 align=center>
	    <tr> <s:url id="insert" action="orderDetailSetUpForInsert"/>
	         <td><s:a href="%{insert}">Click Here to Add Another Order Detail</s:a></td>
	     </tr>
	</table><br/>
    <table align=center class="borderAll">
        <tr>
            <th><s:text name="label.orderDetail.item"/></th>
            <th><s:text name="label.item.itemName"/></th>
            <th><s:text name="label.orderDetail.quantity"/></th>
            <th>&nbsp;</th>
        </tr>
        <s:iterator value="orderDetails" status="status">
            <tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
                <td class="nowrap"><s:property value="item.itemId"/></td>
                <td class="nowrap"><s:property value="item.itemName"/></td>
                <td class="nowrap"><s:property value="quantity"/></td>
                <td class="nowrap"><s:property value="lineAmount"/></td>
                <td class="nowrap">
                                    <s:url id="update" action="orderDetailSetUpForUpdate">
                                       <s:param name="orderDetail.item.itemId" value="item.itemId"/>
                                    </s:url>
                                <s:a href="%{update}">Edit</s:a>
                                &nbsp;&nbsp;&nbsp;
                                <s:url id="delete" action="orderDetailDelete">
                                       <s:param name="orderDetail.item.itemId" value="item.itemId"/>
                                    </s:url>
                                <s:a href="%{delete}">Delete</s:a>
                            </td>

            </tr>
         </s:iterator>
        </table>
</body>
</html>
